import request from '@/utils/request'

// 查询科研项目成果列表
export function listOutcome(query) {
  return request({
    url: '/outcome/outcome/list',
    method: 'get',
    params: query
  })
}

// 查询科研项目成果详细
export function getOutcome(outcomeId) {
  return request({
    url: '/outcome/outcome/' + outcomeId,
    method: 'get'
  })
}

// 新增科研项目成果
export function addOutcome(data) {
  return request({
    url: '/outcome/outcome',
    method: 'post',
    data: data
  })
}

// 修改科研项目成果
export function updateOutcome(data) {
  return request({
    url: '/outcome/outcome',
    method: 'put',
    data: data
  })
}

// 删除科研项目成果
export function delOutcome(outcomeId) {
  return request({
    url: '/outcome/outcome/' + outcomeId,
    method: 'delete'
  })
}

// 用户图片上传
export function uploadAvatar(data) {
  return request({
    url: '/outcome/outcome/avatar',
    method: 'post',
    headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
    data: data
  })
}


export function getOutcomeTrack(outcomeId) {
  return request({
    url: '/outcome/outcome/outcometrack/' + outcomeId,
    method: 'get'
  })
}
